#include <iostream>
#include <stdlib.h>
#include <assert.h>
#include <vector>

#define NUM_VOICES 12

class Segment
{
	public:
		Segment(int id);
		virtual ~Segment();
		
		void print();
		
		bool processTatums(float* tatums, int numTatums);
		
		//Accessors
		int getId();
		float getStart();
		float getDuration();
		float getLoudnessBegin();
		float getLoudnessMax();
		float getLoudnessEnd();
		float getTimeLoudnessMax();
		float getPitch(int i);	//expects value between 0 - 11
		float getTimbre(int i);	//expects value between 0 - 11
		float* getTatums();
		int getNumTatums();
		float getTatum(int i);
		int getSectionId();
		
		//Modifiers
		void setStart(float start);
		void setDuration(float duration);
		void setLoudnessBegin(float f);
		void setLoudnessMax(float f);
		void setLoudnessEnd(float f);
		void setTimeLoudnessMax(float f);
		void setPitch(int i, float val);
		void setTimbre(int i, float val);
		void setSectionId(int i);
		
	private:
		int m_id;
		float m_start;
		float m_duration;
		float m_loudnessBegin;
		float m_loudnessMax;
		float m_loudnessEnd;
		float m_timeLoudnessMax;
		float* m_pitches;
		float* m_timbres;
		float* m_tatums;
		int m_numTatums;
		int m_sectionId;
};

		